package com.nkym.common;/*
 * @ClassName ErrorCode
 * @Desc TODO
 * @Author 19637
 * @Date 2023/4/20 20:58
 * @Version 1.0
 */

public enum ErrorCode {


    ERROR_CODE(50000, "服务器错误", ""),
    PARAM_ERROR(50001, "参数错误", ""),
    PARAM_EMPTY(50002, "参数为空", ""),
    FORBIDDEN(40300, "禁止访问", ""),
    USER_NOTFOUND(40401, "用户不存在", ""),
    USER_NOTHAVE_INVOKE(40402, "没有调用次数", ""),
    USER_REGISTER_ACCOUNT_ERROR(50006, "账户过短或账户重复"),
    USER_LOGIN_ERROR(40001, "账号或者密码错误"),
    USER_UNLOGIN(40003, "未登录"),

    USER_REGISTER_PASSWORD_ERROR(50003, "二次密码错误或密码为空"),
    USER_REGISTER_REPEAT(50005, "账号已经被注册"),
    INTERFACE_EMPTY(50003, "接口不存在", ""),
    INTERFACE_ALREADY_ASSIGN(50004, "接口已经被免费获取，请勿多次获取", "");

    //错误码
    private int code;
    //错误信息
    private String message;
    //错误描述
    private String description;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    ErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
